Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dashboard] Improve faucet claim #5226

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Oct 29, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR enhances the POST request handler in the route.ts file to ensure that a user's wallet is connected before processing the request. It adds functionality to check for an authentication cookie based on the user's connected account.

Detailed summary

  • Added import of getAddress from thirdweb.
  • Introduced a check for the connected wallet using COOKIE_ACTIVE_ACCOUNT.
  • Retrieved the authentication cookie based on the connected wallet address.
  • Returned a JSON response with an error message if no wallet is connected.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 11:31pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Oct 29, 2024 11:31pm
thirdweb_playground ⬜️ Skipped (Inspect) Oct 29, 2024 11:31pm
wallet-ui ⬜️ Skipped (Inspect) Oct 29, 2024 11:31pm

@vercel vercel bot temporarily deployed to Preview – wallet-ui October 29, 2024 23:21 Inactive
Copy link

changeset-bot bot commented Oct 29, 2024

⚠️ No Changeset found

Latest commit: 89a6e1c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

graphite-app bot commented Oct 29, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@vercel vercel bot temporarily deployed to Preview – docs-v2 October 29, 2024 23:21 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 29, 2024 23:21 Inactive
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @kien-ngo and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Oct 29, 2024
@kien-ngo kien-ngo marked this pull request as ready for review October 29, 2024 23:21
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.29%. Comparing base (519349b) to head (89a6e1c).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5226   +/-   ##
=======================================
  Coverage   45.29%   45.29%           
=======================================
  Files        1067     1067           
  Lines       55341    55341           
  Branches     3973     3973           
=======================================
  Hits        25068    25068           
  Misses      29581    29581           
  Partials      692      692           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 519349b
packages 40.30% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43 KB (0%) 861 ms (0%) 4.2 s (+51.63% 🔺) 5.1 s
thirdweb (cjs) 102.91 KB (0%) 2.1 s (0%) 7.2 s (+15.17% 🔺) 9.2 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 257 ms (+16.89% 🔺) 354 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 60 ms (+27.02% 🔺) 70 ms
thirdweb/react (minimal + tree-shaking) 17.38 KB (0%) 348 ms (0%) 832 ms (+30.8% 🔺) 1.2 s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant